
package com.be.beadmin.design.repository;

import com.be.beadmin.design.entity.BopInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
* @author Jiahao Liu
* @date 2023-02-22
**/
public interface BopInfoRepository extends JpaRepository<BopInfo, String>, JpaSpecificationExecutor<BopInfo> {

    BopInfo findBopInfoByIdAndDelete(String id, Integer delete);

    BopInfo findBopInfoById(String id);

    List<BopInfo> findBopInfoByBopCodeOrderBySequence(String BopCode);

    List<BopInfo> findBopInfosByBopCode(String bopCode);

    List<BopInfo> findBopInfosByBopCodeAndDelete(String bopCode,int delete);

    List<BopInfo> findBopInfosByBopCodeOrderBySequenceDesc(String bopCode);

    List<BopInfo> findBopInfosByBopCodeOrderBySequenceAsc(String bopCode);
    void deleteAllByBopCode(String bopCode);

    List<BopInfo> findBopInfoByProcessIdAndDelete(String id, int delete);
}